<script setup>
import {inject} from "vue"
import DesignerElementBox from "../Layout/DesignerElementBox.vue"
const props = defineProps({
    table: {
        type: Object,
    },
    elem: {
        type: Object,
        default: () => {
            return {
                styleConfig: {},
                dataConfig: {},
                children: []
            }
        }
    }
})
const emits = defineEmits(["active", "remove"])
const activeElementId = inject("activeElementId")
</script>

<template>
    <tr class="tr" :style="elem.styleConfig">
<!--        <DesignerElementBox  :is-active="activeElementId === elem.id"/>-->
        <DTableColumn1 v-for="(column, j) in elem.children" :table="table" :key="j" :elem="column" @active="el => emits('active', el)"/>
    </tr>
</template>

<style scoped lang="scss">
.tr {
    position: relative;
    box-sizing: border-box;
}
</style>